package org.jeie.actions;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.image.BufferedImage;

import org.jeie.main.Action;
import org.jeie.main.Canvas;
import org.jeie.messages.Messages;

public class ScaleAction implements Action {
	public Dimension d;
	public Color color;

	public ScaleAction(Dimension d, Color color) {
		this.d = d;
		this.color = color;
	}

	public String getName() {
		return Messages.getString("Action.Scale"); //$NON-NLS-1$
	}

	public BufferedImage apply(BufferedImage img) {
		return Canvas.resize(img, d.width, d.height);
	}
}
